const Koa = require('koa');
const koaBody = require('koa-body');
const app = new Koa();
const path = require('path')
// 使用 koaBody 中间件解析请求体
app.use(koaBody());

// 启动应用程序并监听端口
app.listen(3030, () => {
  console.log('Server started on port 3030');
});

const serve = require('koa-static');
app.use(serve( path.resolve(__dirname, '../public') ));
require('./middlewares/cors')(app);
// require('./routes/upload')(app);
require('./routes/detail')(app);
require('./routes/list')(app);


